/**
 * @developer：MR·Feng
 * 业务请求方法管理
 */

import { httpGet, httpPost } from "@utils/http";
import base from "@utils/base";

const api = {
    getTables() {
        const url = base.listFirstLevelMenuForUser;
        return httpGet(url);
    },
    getTable() {
        const url = base.listFirstLevelMenuForUser;
        return httpPost(url);
    },
    getLogin(params) {
        const url = base.login;
        return httpPost(url, params);
    },
    getLogout(params) {
        const url = base.logout;
        return httpPost(url, params);
    },
    listOthersMenuForUser(params) {
        const url = base.listOthersMenuForUser;
        return httpPost(url, params);
    },
    pageConditionQueryActivityByCreatorId(params) {
        const url = base.pageConditionQueryActivityByCreatorId;
        return httpPost(url, params);
    },
    pageConditionQueryByCreatorId(params) {
        const url = base.pageConditionQueryByCreatorId;
        return httpPost(url, params);
    },
    getByUserId(params) {
        const url = base.getByUserId;
        return httpPost(url, params);
    },
    updateUserPassword(params) {
        const url = base.updateUserPassword;
        return httpPost(url, params);
    },
    queryByActivityBasicId(params) {
        const url = base.queryByActivityBasicId;
        return httpPost(url, params);
    },
    updateByCondition(params) {
        const url = base.updateByCondition;
        return httpPost(url, params);
    },
    queryAddressForFourLinkage(params) {
        const url = base.queryAddressForFourLinkage;
        return httpPost(url, params);
    },
    addActivity(params) {
        const url = base.addActivity;
        return httpPost(url, params);
    },
    queryByUpdate(params) {
        const url = base.queryByUpdate;
        return httpPost(url, params);
    },
    batchDeleteActivity(params) {
        const url = base.batchDeleteActivity;
        return httpPost(url, params);
    },
    saveDrafts(params) {
        const url = base.saveDrafts;
        return httpPost(url, params);
    },
};

export default api;
